package cn.iocoder.yudao.module.erp.controller.admin.purchaseplan.vo.purchaseminordetail;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 小额采购计划明细 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PurchaseMinorDetailRespVO {

    @Schema(description = "采购详情ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22029")
    @ExcelProperty("采购详情ID")
    private Long id;

    @Schema(description = "采购计划ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11601")
    @ExcelProperty("采购计划ID")
    private Long planId;

    @Schema(description = "采购计划编号(系统自动生成)")
    private String planNo;

    @Schema(description = "采购类型SERVICE/EQUIPMENT/NGINEERING/MATERIAL/DIRECT/MINOR", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "采购类型SERVICE/EQUIPMENT/NGINEERING/MATERIAL/DIRECT/MINOR", converter = DictConvert.class)
    @DictFormat("purchase_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String purchaseType;

    @Schema(description = "物料/服务/工程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("物料/服务/工程名称")
    private String itemName;

    @Schema(description = "单位")
    @ExcelProperty("单位")
    private String unit;

    @Schema(description = "规格型号")
    @ExcelProperty("规格型号")
    private String specModel;

    @Schema(description = "货物/验收标准")
    @ExcelProperty("货物/验收标准")
    private String acceptanceStandard;

    @Schema(description = "产地")
    @ExcelProperty("产地")
    private String originPlace;

    @Schema(description = "预估采购数量")
    @ExcelProperty("预估采购数量")
    private BigDecimal estimatedQuantity;

    @Schema(description = "预估单价（含税/万元）", example = "2740")
    @ExcelProperty("预估单价（含税/万元）")
    private BigDecimal estimatedUnitPrice;

    @Schema(description = "合计（含税/万元）")
    @ExcelProperty("合计（含税/万元）")
    private BigDecimal totalAmount;

    @Schema(description = "备注", example = "随便")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}